<?php
## include required files
/*******************************/ 
require_once '../../includefiles.php';
include_once("../../model/budget.php");
/*******************************/
## Create Objects
/*******************************/
$budgetObj = new Model_Budget();

if ($_GET['budgetname']){
	$budgetname = $_GET['budgetname']; 
}
if ($_GET['id']){
	$id = $_GET['id'];
}

if($budgetname){
// this function check username exit or not
	 $result = $budgetObj->checkBudgetName(strtoupper(trim($budgetname)), $id); 
	if(count($result) > 0){	
		if(strtoupper(trim($result['budget_name'])) == strtoupper(trim($budgetname))){  
			echo 'false';
		}
	}
	else{
		echo "true";	
	}
}
unset($budgetObj);
?>


